package com.kaili.db.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.kaili.pojo.dto.arrive.*;
import com.kaili.pojo.entity.HsEwbsStowage;
import com.kaili.pojo.entity.HsEwbsStowageDetail;
import com.kaili.pojo.entity.HsOptArrive;
import com.kaili.pojo.vo.ArriveEwbVO;
import com.kaili.pojo.vo.ExportArriveVO;
import com.kaili.pojo.vo.StowageVO;
import com.kaili.common.exception.BaseExcept;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cgm
 * @since 2018-05-08
 */
public interface IHsOptArriveService extends IService<HsOptArrive> {
    boolean insertBatch(List<HsOptArrive> list);

    /**
     * 查询配载单集合
     * @param page
     * @param search
     * @return
     * @throws Exception
     */
    Page<StowageVO> queryStowageArrive(Page<StowageVO> page, Map search) throws Exception;

    List<StowageVO> queryStowageArriveList(Map search) throws Exception;
    /**
     * 查询配载单详情
     * @param page
     * @param search
     * @return
     * @throws Exception
     */
    Page<ArriveEwbVO> queryArriveEwb(Page<ArriveEwbVO> page, Map search) throws Exception;

    /**
     * 配载单到件
     * @param stowageVos
     * @return
     * @throws Exception
     */
    Boolean doStowageArriveConfirm(List<ArriveStowageDTO> stowageVos)throws BaseExcept;

    /**
     * 根据配载单获取配载单
     * @return
     * @throws Exception
     */
    StowageVO getStowageByStowageNo(Map search) throws Exception;


    Boolean doEwbArriveConfirm(ArriveAddDTO arriveAddBean) throws BaseExcept;

    Boolean updateStowageDetailArrive(HsEwbsStowageDetail ewbsStowageDetail) throws Exception;

    int updatePrintStowage(ArrivePrintNumberDTO printNumberDTO) throws BaseExcept;

    List<ExportArriveVO> exportArriveQueryList(Map map)throws BaseExcept;

    /**配载单取消运单到件
     *
     * @return
     * @throws BaseExcept
     */
    Boolean doStowageArriveCancel(List<ArriveCancelDTO> arriveCancel) throws BaseExcept;

    /**
     * 运单取消到件
     * @param cancelBean
     * @return
     * @throws BaseExcept
     */
    Boolean doEwbArriveCanCel(ArriveCancelDTO cancelBean) throws BaseExcept;

    List<ArriveEwbVO> queryPrintArriveEwb(Map map)  throws BaseExcept;
}
